//=============================================================================
/**
 * @file	pkthln_throw_local.h
 * @brief	玉投げ
 * @date	2008.09.11
 */
//=============================================================================

#ifndef	__PKTHLN_THROW_LOCAL_H__
#define	__PKTHLN_THROW_LOCAL_H__

#include "../../pokethlon.h"
#include "../../pkthln_poke_act.h"

#define THROW_EVENT_POKE_NUM_ALL	(ENTRY_MAX*ENTRY_MEMBER_NUM_MAX)	//自分３体含む
#define HP_MAX	(120)
#define BALL_SPD_MAX2	(3.0)
#define BALL_SPD_MAX	(2.0)
#define BALL_SPD_MIN	(1.0)
#define LV_FST	(1)
#define LV_2ND	(2)
#define LV_3RD	(3)
#define LEVEL_MAX	(4)
enum{
	POKE_ST_NONE = 0,
	POKE_ST_PANIC,
	POKE_ST_FATIGUE,
};

typedef enum {
	BALL_ST_NONE,
	BALL_ST_MOVE,
	BALL_ST_SET,
	BALL_ST_BREAK,
}BALL_STATE;

typedef struct THROW_POKE_tag
{
	PKTHLN_ACT_PTR PanicActPtr;
	float Technique2;
	float Power;
	float Damage;
	int Technique;
	u16 Point;
	s16 Hp;
	u8 StopTime;
	u8 State;
	u8 dummy;
	u8 Hit;
	u16	PokeAnm;
	u16 ThrowAnmFlg;
}THROW_POKE;

typedef struct THROW_BALL_tag
{
	PKTHLN_ACT_PTR BallActPtr;
	PKTHLN_ACT_PTR ShdwActPtr;
	PKTHLN_ACT_PTR BreakActPtr;
	BALL_STATE State;
	VecFx32 Pos;
	VecFx32 Dir;
	VecFx32 ShotPos;
	VecFx32 TouchPos;
	u8 BreakWait;
	u8 OrgIdx;
	u8 BreakFlg;
	u8 PointGet;
	u16 Level;
	u16 Size;
}THROW_BALL;

//判定空間のポケモン座標
static const VecFx32 ChkPokePos[THROW_EVENT_POKE_NUM_ALL] =
{
	{25*FX32_ONE,0,61*FX32_ONE},{33*FX32_ONE,0,61*FX32_ONE},{41*FX32_ONE,0,61*FX32_ONE},
	{61*FX32_ONE,0,41*FX32_ONE},{61*FX32_ONE,0,33*FX32_ONE},{61*FX32_ONE,0,25*FX32_ONE},
	{41*FX32_ONE,0,5*FX32_ONE},{33*FX32_ONE,0,5*FX32_ONE},{25*FX32_ONE,0,5*FX32_ONE},
	{5*FX32_ONE,0,25*FX32_ONE},{5*FX32_ONE,0,33*FX32_ONE},{5*FX32_ONE,0,41*FX32_ONE},
};

#endif	//__PKTHLN_THROW_LOCAL_H__
